/*******************************************************************************
 * Copyright (c) 2011 Grupo de Sistemas Inteligentes (GSI) - DIT UPM
 *
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License v1.0
 * which accompanies this distribution, and is available at
 * http://www.eclipse.org/legal/epl-v10.html
 *******************************************************************************/
package es.upm.dit.gsi.eclipse.jadex.util;

import java.net.URL;

import org.eclipse.jface.resource.ImageDescriptor;
import org.eclipse.swt.graphics.Image;

import es.upm.dit.gsi.eclipse.jadex.navigator.Activator;

/**
 * 
 * 
 * @author Pablo Muñoz
 */
public final class ImageFactory {
	public static final String IMPORTS_ICON = "new_package.png";
	
	public static final String CAPABILITIES_ICON = "new_capability_small.png";
	
	public static final String BELIEF_BASE_ICON = "beliefbase2.png";
	
	public static final String BELIEF_ICON = "bulb2.png";
	
	public static final String BELIEF_REF_ICON = "bulb2ref.png";
	
	public static final String BELIEF_SET_ICON = "bulbs2.png";
	
	public static final String BELIEF_REF_SET_ICON = "bulbs2ref.png";
	
	public static final String PLAN_BASE_ICON = "planbase2.png";

	public static final String GOAL_BASE_ICON = "goalbase2.png";
	
	public static final String EXPRESSIONS_ICON = "text_letter_omega.png";
	
	public static final String PROPERTIES_ICON = "document-properties.png";
	
	public static final String PLAN_ICON = "plan2.png";
	
	public static final String ACHIEVEGOAL_ICON = "cloud2a.png";
	
	public static final String PERFORMGOAL_ICON = "cloud2p.png";
	
	public static final String MAINTAINGOAL_ICON = "cloud2m.png";
	
	public static final String QUERYGOAL_ICON = "cloud2q.png";
	
	public static final String METAGOAL_ICON = "cloud2meta.png";
	
	public static final String ACTION_ICON = "Action.png";
	
	public static final String AGENT_ICON = "agent.png";
	
	public static final String GSI_BANNER = "logo.png";
	
	public static final String GSI_BANNER_SMALL = "small_logo.png";
	
	public static final String EVENTS_ICON = "Event.png";
	
	public static final String CONFIGURATIONS_ICON = "cog.png";
	
	public static final String CONFIGURATION_ENTRY_ICON = "cog_go.png";
	
	public static final String BULLET_ORANGE = "bullet_orange.png";
	
	public static final String BULLET_BLUE = "bullet_blue.png";
	
	public static final String PACKAGE = "package.png";
	
	public static final String PACKAGE_GO = "package_go.png";
	
	public static final String SCRIPT = "script.png";
	
	public static final String SCRIPT_GO = "script_go.png";
	
	public static final String BULLET_BLACK = "bullet_black.png";
	
	/**
	 * 
	 * @param fileName
	 * @return
	 */
	public final static Image getIcon(String fileName){
		URL url = null;
		try {
    	url = new URL(Activator.getDefault().getBundle().getEntry("/icons").toString() + fileName);
		} catch (Exception e) {
		}
		return (ImageDescriptor.createFromURL(url)).createImage();
	}
	
	/**
	 * 
	 * @param fileName
	 * @return
	 */
	public final static ImageDescriptor getImageDescriptor(String fileName){
		URL url = null;
		try {
    	url = new URL(Activator.getDefault().getBundle().getEntry("/icons").toString() + fileName);
		} catch (Exception e) {
		}
		return ImageDescriptor.createFromURL(url);
	}
}
